package com.loanpcase;

import com.alibaba.fastjson.JSONObject;
import com.util.GzipUtil;

import java.util.HashMap;
import java.util.Map;

public class RLDJTEST extends LPCase{


	@Override
	protected String getRequestUrl() {
		return "/RLMS/RLDJ2TEST";
	}

	public Map<String,Object> getRequestData(){
		HashMap<String,Object> REQUESTDATA = new HashMap<String, Object>();
		REQUESTDATA.put("DOCKING_ORGNO","00001");
		REQUESTDATA.put("COOPER_CODE","90001");
		REQUESTDATA.put("GETDATE","20180101");
		REQUESTDATA.put("DATATYPE","002");
		return REQUESTDATA;
		
	}

	static public void main(String[] args){
		System.out.println(System.currentTimeMillis());
		new RLDJTEST().run(TEST_URL);
		//new RLDJTEST().run("http://22.145.28.160:11001/loanproxy");
		System.out.println(System.currentTimeMillis());
	}

	@Override
	protected void handleResult(String result){
		System.out.println(result);
		JSONObject rej = JSONObject.parseObject(result);
		JSONObject RESULTOBJECT = (JSONObject) rej.get("RESULTOBJECT");
		//System.out.println(map.get("RESULTOBJECT"));
		String data = GzipUtil.ungzipString(RESULTOBJECT.get("ITEMS").toString());
		System.out.println(data);
	};


	


}
